package ajaxTestSuite;

import com.thoughtworks.selenium.SeleneseTestCase;

public class DeferCandidate_FilteredTextBox extends SeleneseTestCase {
	@Override
	public void setUp() throws Exception {
		setUp("http://www.asp.net/", "*iexplore");
		selenium.setSpeed("1000");
	}

	public void testFilteredTextBox() throws Exception {
		selenium.open("/ajax/ajaxcontroltoolkit/Samples/Default.aspx");
		selenium.waitForPageToLoad("30000");
		selenium.click("//*[@id='ctl00_SamplesLinks_ctl16_SamplesLink']");
		selenium.waitForPageToLoad("30000");
		selenium.type("//*[@id='ctl00_SampleContent_TextBox1']", "testData");
		assertEquals(selenium.getText("//*[@id='ctl00_SampleContent_TextBox1']"), "");
		selenium.type("//*[@id='ctl00_SampleContent_TextBox1']", "TESTDATA");
		assertEquals(selenium.getText("//*[@id='ctl00_SampleContent_TextBox1']"), "");
		selenium.type("//*[@id='ctl00_SampleContent_TextBox1']", "testData");
		assertEquals(selenium.getText("//*[@id='ctl00_SampleContent_TextBox1']"), "");
		selenium.type("//*[@id='ctl00_SampleContent_TextBox1']", "04041893");
		System.out.println(selenium.getText("id=ctl00_SampleContent_TextBox1"));
		assertEquals(selenium.getText("//*[@id='ctl00_SampleContent_TextBox1']"), "04041893");
		System.out.println("");
	}
}